#include <stdio.h>
#include <errno.h>
#include <string.h>

int main(int argc, char const *argv[]) 
{
    FILE *file = fopen("nonexistent_file.txt", "r");
    if (file == NULL) {
        printf("Error opening file:%s\n",strerror(errno));
        perror("Error opening file");
    }
    
    else {
        printf("File opened successfully(%p)\n", file);
    }
    return 0;
}